package com.dtx.filedemo3;

import junit.framework.TestCase;

public class FavFTPUtilTest extends TestCase {

    public void testFavFTPUtil(){
        String hostname = "20.52.7.8";
        int port = 21;
        String username = "test";
        String password = "test";
        String pathname = "D:\\ftpserver";
        String filename = "demo.html";
        String originfilename = "D:\\HbuilderProject\\adminLTEdemo\\demo.html";
        //FavFTPUtil.deleteFile(hostname,port,username,password,pathname,filename);
        /*if(FavFTPUtil.uploadFileFromProduction(hostname,
                port, username, password,
                pathname, filename, originfilename)){
            System.out.println("文件上传成功");
        }else {
            System.out.println("文件上传失败");
        }*/

        String localpath = "D:\\img";

        if(FavFTPUtil.downloadFile(hostname
                , port, username, password,
                pathname, filename, localpath)){
            System.out.println("文件下载成功");
        }else{
            System.out.println("文件下载失败");
        }
    }
}
